package com.reshare.controller;

import com.reshare.base.BaseController;
import com.reshare.dto.TreeDto;
import com.reshare.service.ModuleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("module")
public class ModuleController extends BaseController {

    @Resource
    private ModuleService moduleService;



    @RequestMapping("findModules2")
    @ResponseBody
    public List<TreeDto> findModules(Integer roleId){
        List<TreeDto> modules2 = moduleService.findModules2(roleId);
        System.out.println(modules2);
        return moduleService.findModules2(roleId);
    }
}
